// models/user.go
package models

import (
	"gorm.io/gorm"
	"time"
)

type User struct {
	ID        uint           `gorm:"primaryKey" json:"id"`
	Username  string         `gorm:"index;not null" json:"username"`
	Email     string         `json:"email"`
	Password  string         `gorm:"not null" json:"password"`
	Images    []Image        `gorm:"foreignKey:UserID" json:"images"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
}
